<<<<<<< HEAD
#include "myobject2.h"
#include <QPoint>
#include <QVector2D>
#include <QPainter>
MyObject2::MyObject2(QPoint startPos,QPoint targetPos,QString fileName): QObject(0),pixmap(fileName)
{
  this->startPos=startPos;
    this->currentPos=startPos;
    this->targetPos=targetPos;
    speed=1.0;
}
void MyObject2::move(){
    QVector2D vector(targetPos-startPos);
    vector.normalize();
    currentPos=currentPos+vector.toPoint()*speed;
}
void MyObject2::draw(QPainter*painter){
    painter->drawPixmap(currentPos,pixmap);
}
=======
#include "myobject2.h"
#include <QPoint>
#include <QVector2D>
#include <QPainter>
MyObject2::MyObject2(QPoint startPos,QPoint targetPos,QString fileName): QObject(0),pixmap(fileName)
{
  this->startPos=startPos;
    this->currentPos=startPos;
    this->targetPos=targetPos;
    speed=1.0;
}
void MyObject2::move(){
    QVector2D vector(targetPos-startPos);
    vector.normalize();
    currentPos=currentPos+vector.toPoint()*speed;
}
void MyObject2::draw(QPainter*painter){
    painter->drawPixmap(currentPos,pixmap);
}
>>>>>>> 199f3fb0e9bc83f97607ce663cfb658435caaa4f
